//
//  OCOpenAddTool.swift
//  MoodDiary
//
//  Created by OVIX on 2020/12/14.
//

import UIKit

class OCOpenAddTool: NSObject {
    @objc class func openAddMood() {
        
        var diaryModel = DiaryModel()
        diaryModel.timeStampStr = NSString.currentTimeStamp()
        // 默认晴天
        diaryModel.weatherStr = "晴天"
        
        let vc = AddMoodViewController()
        vc.dayStr = "今天"
//        var timeStr = ((NSString.currentYear() + "-" + NSString.currentMonth())) + "-" + NSString.currentDay()
//        timeStr += " "
//        timeStr += NSString.getHourAndMinute(NSString.currentTimeStamp())
//        diaryModel.timeStampStr = NSString.convertTime(toTimeStamp: timeStr)
        vc.diaryModel = diaryModel
//        vc.needShowCalender = true
        
        let nav = MainNavigationController(rootViewController: vc)
        nav.modalPresentationStyle = .overCurrentContext;
        nav.modalTransitionStyle = .coverVertical;
        UIApplication.shared.keyWindow?.rootViewController?.present(nav, animated: true, completion: nil)
        
    }
}
